package config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.jdbc.core.JdbcTemplate;
import reponsitory.PeopleRepository;

import javax.sql.DataSource;

/**
 *
 * config
 * 一般的配置
 * 2018/6/10-21:44
 * 2018
 * Created by wuqiang on 2018/6/10.
 */
@Configuration
@Import(DbConfig.class)
@ComponentScan(basePackageClasses = PeopleRepository.class)
public class CommonConfig {

    @Bean
    public JdbcTemplate jdbcTemplate(DataSource dataSource){
        return new JdbcTemplate(dataSource);
    }

}
